home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2187 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  899 b 

  1. Path: zetnet.co.uk!demon!alex
  2. From: alex@warp.demon.co.uk (Alex Tucker)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: gcc & regargs
  5. Date: 28 Jan 96 10:36:17 GMT
  6. Organization: Skipsea, East Yorks, UK
  7. Message-ID: <alex.04j6@warp.demon.co.uk>
  8. NNTP-Posting-Host: warp.demon.co.uk
  9. Summary: How to get gcc to pass function arguments in registers
  10. Keywords: gcc, register, function
  11. X-NNTP-Posting-Host: warp.demon.co.uk
  12. X-Newsreader: TIN [version 1.2 PL2]
  13.  
  14. Is there an easy way to get gcc to pass function arguments into a function
  15. call as registers instead of on the stack, for use with e.g. hook functions?
  16.  
  17. As an example, can gcc do the equivalent of the following in SAS C:
  18.  
  19.    ULONG __saveds __asm HookFunc(register __a0 struct Hook *hook,
  20.                                  register __a2 APTR         object,
  21.                                  register __a1 APTR         message);
  22. ???
  23.  
  24. Wonderingly,
  25. Alex
  26.